package test;

import com.nkzy.Pojo.article;
import org.junit.jupiter.api.Test;

public class articletest {
    @Test
    public void insertArticle() {
        article article = new article();
        article.setTitle("测试");
        article.setContent("测试");
        article.setAuthor("测试");
        article.setCreate_time("2020-01-01");
        System.out.println(article);
        System.out.println(article.getTitle());
        System.out.println(article.getContent());
        System.out.println(article.getAuthor());
        System.out.println(article.getCreate_time());

    }

    @Test
    public void selectArticleById() {
        article article = new article();
        article.setId(1);
        System.out.println(article);
        System.out.println(article.getId());

    }
    @Test
    public void updateArticle() {
        article article = new article();
        article.setId(1);
        article.setTitle("测试");
        article.setContent("测试");
        article.setAuthor("测试");
        article.setCreate_time("2020-01-11");
        System.out.println(article);
        System.out.println(article.getId());
        System.out.println(article.getTitle());
        System.out.println(article.getContent());
        System.out.println(article.getAuthor());
    }
    @Test
    public void deleteArticleById() {
        article article = new article();
        article.setId(1);
        System.out.println(article);
        System.out.println(article.getId());
    }
    @Test
    public void selectAllArticles() {
        article article = new article();
        System.out.println(article);
    }
    @Test
    public void selectArticlesByAuthor() {
        article article = new article();
        article.setAuthor("测试");
        System.out.println(article);
        System.out.println(article.getAuthor());
    }
}

